package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RecommendMapper;
import com.ruoyi.system.domain.Recommend;
import com.ruoyi.system.service.IRecommendService;

/**
 * 推荐帖审核Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-05
 */
@Service
public class RecommendServiceImpl implements IRecommendService 
{
    @Autowired
    private RecommendMapper recommendMapper;

    /**
     * 查询推荐帖审核
     * 
     * @param recId 推荐帖审核主键
     * @return 推荐帖审核
     */
    @Override
    public Recommend selectRecommendByRecId(Long recId)
    {
        return recommendMapper.selectRecommendByRecId(recId);
    }

    /**
     * 查询推荐帖审核列表
     * 
     * @param recommend 推荐帖审核
     * @return 推荐帖审核
     */
    @Override
    public List<Recommend> selectRecommendList(Recommend recommend)
    {
        return recommendMapper.selectRecommendList(recommend);
    }

    /**
     * 新增推荐帖审核
     * 
     * @param recommend 推荐帖审核
     * @return 结果
     */
    @Override
    public int insertRecommend(Recommend recommend)
    {
        return recommendMapper.insertRecommend(recommend);
    }

    /**
     * 修改推荐帖审核
     * 
     * @param recommend 推荐帖审核
     * @return 结果
     */
    @Override
    public int updateRecommend(Recommend recommend)
    {
        return recommendMapper.updateRecommend(recommend);
    }

    /**
     * 批量删除推荐帖审核
     * 
     * @param recIds 需要删除的推荐帖审核主键
     * @return 结果
     */
    @Override
    public int deleteRecommendByRecIds(Long[] recIds)
    {
        return recommendMapper.deleteRecommendByRecIds(recIds);
    }

    /**
     * 删除推荐帖审核信息
     * 
     * @param recId 推荐帖审核主键
     * @return 结果
     */
    @Override
    public int deleteRecommendByRecId(Long recId)
    {
        return recommendMapper.deleteRecommendByRecId(recId);
    }

    @Override
    public List<Recommend> selectRecommendListByUserId(Long userId) {
        return recommendMapper.selectRecommendListByUserId(userId);
    }

    @Override
    public Recommend selectRecommendCountByUserId(Long recId) {
        return recommendMapper.selectRecommendByRecId(recId);
    }
}
